//
//  ORAboutViewController.m
//  NewsWith
//
//  Created by rimi on 2016/12/14.
//  Copyright © 2016年 dongfumei. All rights reserved.
//

#import "ORAboutViewController.h"

@interface ORAboutViewController ()<UITableViewDelegate,UITableViewDataSource>

@property (nonatomic, strong) UILabel *AboutLabel;
@property (nonatomic, strong) UITableView *tableView;
@property (nonatomic, strong) UIImageView *backImage;

@end

@implementation ORAboutViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self initUI];
    
}

- (void)initUI{
    
    self.view.backgroundColor = [UIColor whiteColor];
    self.navigationItem.title = @"关于我们";
    [self.view addSubview:self.backImage];
    [self.view addSubview:self.tableView];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    
}

#pragma mark - UITableViewDelegate

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 5;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    static NSString *reuseIdentifier = @"ORAboutViewController";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:reuseIdentifier];
    if (!cell) {
        cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier];
    }
    if (indexPath.row == 0) {
        cell.textLabel.text = @"产品名称：NEWS";
    }else if (indexPath.row == 1){
        cell.textLabel.text = @"合作公司：暂无";
    }else if (indexPath.row == 2){
        cell.textLabel.text = @"赞助人：暂无";
    }else if (indexPath.row == 3){
        cell.textLabel.text = @"团队名字：菜鸡小分队";
    }else if (indexPath.row == 4){
        cell.textLabel.text = @"管理员QQ：1335312861";
    }
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    return cell;
}

#pragma mark - getter

- (UILabel *)AboutLabel{
    if (!_AboutLabel) {
        _AboutLabel = [[UILabel alloc]initWithFrame:AAdaptionRect(0, 0, 0, 0)];
        
        
    }
    return _AboutLabel;
}

- (UIImageView *)backImage{
    if (!_backImage) {
        _backImage = [[UIImageView alloc]initWithFrame:AAdaptionRect(0, 0, 120, 120)];
        _backImage.center = AAadaptationPoint(kBaseWidth/2, 84);
        _backImage.image = [UIImage imageNamed:@"NEWS"];
    }
    return _backImage;
}

- (UITableView *)tableView{
    if (!_tableView) {
        _tableView = [[UITableView alloc]initWithFrame:AAdaptionRect(0, CGRectGetMaxY(self.backImage.frame)/AAdaptationWidth()+44, kBaseWidth, 250)];
        _tableView.delegate = self;
        _tableView.dataSource = self;
        //
        _tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
        _tableView.scrollEnabled = NO;
    }
    return _tableView;
}

@end
